<script lang="ts" setup>
import { useUserStore } from "@/store/modules/user"
import Admin from "./components/Admin.vue"
import Editor from "./components/Editor.vue"
// import Admin from "./components/Admin.vue"

const userStore = useUserStore()
const isAdmin = userStore.roles.includes("admin")
</script>

<template>
  <component :is="isAdmin ? Admin : Editor" />
  <!-- <component :is="isAdmin ? Editor : Admin" /> -->
  <!--
  <div style="width: 100%; height: 100vh; display: flex; justify-content: center; align-items: center;">
    <div>查看设备</div>
    <Admin />
  </div> -->
</template>
